package one.one.thirty;

import java.util.Arrays;

public class Array {

	static int gcd(int a, int b) {
		if (a == 0) {
			return b;
		}
		if (b == 0) {
			return a;
		}
		if (a < b) {
			int t = a;
			a = b;
			b = t;
		}
		int r = a % b;
		if (r == 0) {
			return b;
		}
		return gcd(b, r);
	}

	static boolean[][] prime(boolean[][] a) {
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				if (gcd(i, j) == 1) {
					a[i][j] = true;
				}
			}
		}
		return a;
	}

	public static void main(String[] args) {
		boolean[][] a = new boolean[3][3];

		a = prime(a);
		
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.print(a[i][j]);
			}
			System.out.println();
		}
	}

}
